<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>layui.form小例子</title>
    <link rel="stylesheet" href="layui.css" media="all">
    <link rel="stylesheet" href="/css/font.css">
    <link rel="stylesheet" href="/css/xadmin.css">
    <script src="/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/js/xadmin.js"></script>
</head>
<body>
<blockquote class="layui-elem-quote">
    <p class="layui-col-md-offset6">
        请确认信息预订：
    </p>
</blockquote>
<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-xs6" >
            <td th:if="${roomType.getTypeID()==1}"><img src="images/1547863202049.jpg" width="300px"></td>
            <td th:if="${roomType.getTypeID()==2}"><img src="images/1547863299550.jpg"width="300px"></td>
            <td th:if="${roomType.getTypeID()==3}"><img src="images/1547863308339.jpg" width="300px"></td>
            <td th:if="${roomType.getTypeID()==4}"><img src="images/1547863315754.jpg" width="300px"></td>
            <td th:if="${roomType.getTypeID()==5}"><img src="images/1547863370413.jpg" width="300px"></td>
            <td th:if="${roomType.getTypeID()==6}"><img src="images/1547863398297.jpg" width="300px"></td>
            <td th:if="${roomType.getTypeID()==7}"><img src="images/1547863458969.jpg" width="300px"></td>
            <td th:if="${roomType.getTypeID()==8}"><img src="images/1547863486075.jpg" width="300px"></td>
            <td th:if="${roomType.getTypeID()==9}"><img src="images/1547863508790.jpg" width="300px"></td>
            <td th:if="${roomType.getTypeID()==10}"><img src="images/1547863538884.jpg" width="300px"></td>
            <div style="margin-top: 5px">
                <h2>房型：<td th:text="${roomType.getTypeName()}"></td></h2>
            </div>
            <ul style="margin-top: 5px">
                <li><span>房价:</span><span th:text="${roomType.getPrice() }"></span></li>
                <li><span>床位数:</span><span th:text="${roomType.getBedNum()}"></span></li>
                <li><span>可住:</span><span th:text="${roomType.getLiveNum()}"></span>人</li>
                <li><span>其他:</span><span th:text="${roomType.getRemark()}"></span></li>
            </ul>
        <div style="margin-top: 5px">

            <a href="/user-lookRoomType">更多房型</a>
        </div>
        </div>
<div class="layui-col-xs6" >
<form class="layui-form" action="#" th:action="@{/user-book}" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">日期选择</label>
        <div class="layui-input-inline">
            <input type="text" readonly="readonly" class="layui-input" id="arriveDate" name="arriveDate" th:value="${session.arriveDate}">
            <input type="text" readonly="readonly"  class="layui-input" id="leaveDate" name="leaveDate" th:value="${session.leaveDate}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">总计费用</label>
        <div class="layui-input-inline">
            <input type="text" name="money" required  lay-verify="required"  readonly="readonly" autocomplete="off" class="layui-input" th:value="${price}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">身份号</label>
        <div class="layui-input-inline">
            <input type="text" name="custNum" required lay-verify="required" placeholder="请输入身份号" autocomplete="off" class="layui-input" th:value="${custNum}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">手机号</label>
        <div class="layui-input-inline">
            <input type="text" name="custPhone" required  lay-verify="required" placeholder="请输入手机号" autocomplete="off" class="layui-input" th:value="${custPhone}">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-inline">
            <textarea name="remark" placeholder="请输入内容" class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">预订</button>
        </div>
    </div>
</form>
</div>
    </div>
</div>
<div th:if="${price==0.0}">
    <script>
        var form = layui.form;
        layui.use('form', function(){
        layer.alert("日期出错啦！！",function () {
                window.location.href = "/user-lookRoomType";
        });
        });
    </script>
</div>
<script>
    var form = layui.form;
    layui.use('form', function(){

    });
</script>
</body>
</html>